package com.scpii.universal.pns.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.scpii.universal.hibernate.dao.BaseDao;
import com.scpii.universal.hibernate.intface.BaseInterface;
import com.scpii.universal.pns.hibernate.entity.UserActions;

public class UserActionsService implements BaseInterface<UserActions> {

	private BaseDao<UserActions> userActionsDao;

	public void setUserActionsDao(BaseDao<UserActions> userActionsDao) {
		this.userActionsDao = userActionsDao;
	}

	public UserActions get(Long id) throws Exception {
		return userActionsDao.get(id);
	}

	@Override
	public UserActions get(Integer id) throws Exception {
		return null;
	}

	@Override
	public List<UserActions> getAll() throws Exception {
		return null;
	}

	@Override
	public UserActions get(String propertyName, Object value) throws Exception {
		return null;
	}

	@Override
	public List<UserActions> getList(String propertyName, Object value)
			throws Exception {
		return null;
	}

	@Override
	public Long getTotalCount() throws Exception {
		return null;
	}

	@Override
	public void save(UserActions obj) throws Exception {

	}

	@Override
	public void update(UserActions obj) throws Exception {

	}

	@Override
	public void delete(UserActions obj) throws Exception {

	}

	@Override
	public void delete(Integer id) throws Exception {

	}

	@Override
	public List<UserActions> hqlGetList(String hql, Map<String, Object> argsMap)
			throws Exception {
		return null;
	}

	@Override
	public void hqlUpdate(String namedHqlQuery, Map<String, Object> argsMap)
			throws Exception {

	}

	@Override
	public Long hqlGetNums(String namedHqlQuery, Map<String, Object> argsMap)
			throws Exception {
		return userActionsDao.hqlGetNums(namedHqlQuery, argsMap);
	}

	@Override
	public List<UserActions> sqlGetList(String sqls, Map<String, Object> argsMap)
			throws Exception {
		return null;
	}

	@Override
	public void sqlUpdate(String sqls, Map<String, Object> argsMap)
			throws Exception {

	}

	@Override
	public Long sqlGetNum(String sqls, Map<String, Object> argsMap)
			throws Exception {
		return userActionsDao.sqlGetNum(sqls, argsMap);
	}

	public List<?> getStatisticDataByContentId(long contentId) {
		Map<String, Object> argsMap = new HashMap<String, Object>();
		argsMap.put("targetId", contentId);
		return userActionsDao.sqlGetListForIndefiniteCols(
				"GET_STATISTICDATA_BYCONTENTID", argsMap);
	}
}
